how to solve an equation with parentheses